<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="content-language" content="zh-CN" />
<title>茅台电商报单</title>
<link rel="stylesheet" type="text/css"
	href="jquery-easyui-1.5.4.2/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css"
		href="jquery-easyui-1.5.4.2/themes/icon.css">
		<link rel="stylesheet" type="text/css"
			href="jquery-easyui-1.5.4.2/demo/demo.css">
			<script type="text/javascript"
				src="jquery-easyui-1.5.4.2/jquery.min.js"></script>
			<script type="text/javascript"
				src="jquery-easyui-1.5.4.2/jquery.easyui.min.js"></script>
			<script type="text/javascript"
				src="jquery-easyui-1.5.4.2/locale/easyui-lang-zh_CN.js"></script>
</head>
<body>
	<h2>茅台账号添加：</h2>
	<p>每个账号和支付宝账号必须一起添加！</p>
	<div style="margin:20px 0;"></div>
	<div class="easyui-panel" title="添加" style="width:400px;padding:30px 60px">
		<div style="margin-bottom:20px">
			<div>支付宝账号:(必填)</div>
			<input id="zfbcode" class="easyui-textbox" style="width:100%;height:32px">
		</div>
		<div style="margin-bottom:20px">
			<div>茅台账号:(必填)</div>
			<input id="code" class="easyui-textbox" style="width:100%;height:32px">
		</div>
		<div style="margin-bottom:20px">
			<div>茅台密码:(必填)</div>
			<input id="pwd" class="easyui-textbox" style="width:100%;height:32px">
		</div>
		<div style="margin-bottom:20px">
			<div>联系人电话:(必填)</div>
			<input id="tel" class="easyui-textbox" style="width:100%;height:32px">
		</div>
		<div style="margin-bottom:20px">
			<div>联系人QQ:(必填)</div>
			<input id="qq" class="easyui-textbox" style="width:100%;height:32px">
		</div>
		<div>
			<a href="#" class="easyui-linkbutton" iconCls="icon-ok" style="width:100%;height:32px" onclick="submitForm()">添加</a>
		</div>
	</div>
	<div class="easyui-panel" style="width:400px;padding:30px 60px">
		<a href="#" class="easyui-linkbutton" style="width:100%;height:32px" onclick="gotoquery()">查询点我</a>
	</div>
	<script>
		
		function submitForm(){
			var zfbcode = $('#zfbcode').textbox('getValue');
			var code = $('#code').textbox('getValue');
			var pwd = $('#pwd').textbox('getValue');
			var tel = $('#tel').textbox('getValue');
			var qq = $('#qq').textbox('getValue');
			if(zfbcode=='') {
				alert("请填写支付宝账号");
				return;
			}
			if(code=='') {
				alert("请填写茅台账号");
				return;
			}
			if(pwd=='') {
				alert("请填写茅台密码");
				return;
			}
			if(tel=='') {
				alert("请填写电话");
				return;
			}
			if(qq=='') {
				alert("请填写QQ");
				return;
			}
			//alert(endDate);
			var path = "addcode"; 
			$.ajax({  
					url : path,  
					type : "post",  
					data : {  
						zfbcode : zfbcode,  
						code : code,
						pwd:pwd,
						tel:tel,
						qq:qq  
					},  
				dataType : "json",  
				success : function(datas) {  
					$.messager.alert('信息','添加成功!');
					$('#code').textbox('setValue','');
					$('#pwd').textbox('setValue','');
				}  
			});  
		}
		function gotoquery(){
			window.location.href='querycode.jsp';
		}
		
	</script>
</body>






